/* Copyright (c) 2004-2024 peigen.info. All rights reserved. */

package info.peigen.hotpot.component.data.repository;


import java.io.Serializable;

/**
 * <b>(NoCreateTimeEntityable)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/4/25
 */
public interface NoCreateTimeEntityable extends Entity, Serializable {

    /**
     * 获取ID
     *
     * @return 返回序列化对象
     */
    Serializable getId();

    /**
     * 返回是否是新的一条记录的结果
     *
     * @return 返回boolean
     */
    default boolean isNew() {
        return null == getId();
    }

}